import {request} from './request'

//文件上传
export const uploadFile = data => request({url: '/common/uploadFile', method: 'post', data})

//文件上传base64
export const uploadBase64 = data => request({url: '/common/uploadBase64', method: 'post', data})

//登录
export const login = data => request({url: '/user/login', method: 'post', data})

//查询订单列表
export const getAllOrderList = data => request({url: '/order/getAllOrderList', data})

//查询订单详情
export const getOrderDetails = data => request({url: '/order/getOrderDetails', data})

//删除订单
export const removeOrder = data => request({url: '/order/removeOrder', data})

//完成订单
export const completeOrder = data => request({url: '/order/completeOrder', data})

//查询菜单
export const getMenu = data => request({url: '/menu/getMenu', data})

//查询菜单详情
export const getMenuDetails = data => request({url: '/menu/getMenuDetails', data})

//查询菜单分类
export const getMenuType = data => request({url: '/menu/getMenuType', data})

//添加菜单
export const addMenu = data => request({url: '/menu/addMenu', method: 'post', data})

//修改菜单
export const editMenu = data => request({url: '/menu/editMenu', method: 'post', data})

//删除菜单
export const deleteMenu = data => request({url: '/menu/deleteMenu', data})

//添加菜单分类
export const addMenuType = data => request({url: '/menu/addMenuType', method: 'post', data})

//修改菜单
export const editMenuType = data => request({url: '/menu/editMenuType', method: 'post', data})

//查询菜单分类详情
export const getMenuTypeDetails = data => request({url: '/menu/getMenuTypeDetails', data})

//删除菜单分类
export const deleteMenuType = data => request({url: '/menu/deleteMenuType', data})

//查询用户列表
export const getUser = data => request({url: '/user/getUser', data})

//查询用户详情
export const getUserDetails = data => request({url: '/user/getUserDetails', data})

//修改用户
export const editUser = data => request({url: '/user/editUser', method: 'post', data})

//查询管理员列表
export const getAdmin = data => request({url: '/user/getAdmin', data})

//查询个人资料
export const getPersonalInfo = data => request({url: '/user/getPersonalInfo', data})

//查询管理员详情
export const getAdminDetails = data => request({url: '/user/getAdminDetails', data})

//修改管理员
export const editAdmin = data => request({url: '/user/editAdmin', method: 'post', data})

//修改密码
export const editPassword = data => request({url: '/user/editPassword', method: 'post', data})

//添加管理员
export const addAdmin = data => request({url: '/user/addAdmin', method: 'post', data})

//删除管理员
export const removeAdmin = data => request({url: '/user/removeAdmin', data})

//查询轮播图
export const getCarousel = data => request({url: '/other/getCarousel', data})

//添加轮播图
export const addCarousel = data => request({url: '/other/addCarousel', method: 'post', data})

//删除轮播图
export const deleteCarousel = data => request({url: '/other/deleteCarousel', data})

//查询推荐
export const getRecommend = data => request({url: '/other/getRecommend', data})

//消息中心
export const getMessageList = data => request({url: '/order/getMessageList', data})

//查询充值列表
export const getRechargeList = data => request({url: '/recharge/getRechargeList', data})

//删除充值订单
export const removeRecharge = data => request({url: '/recharge/removeRecharge', data})

//首页数据
export const getHomeData = data => request({url: '/common/getData', data})